﻿using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

namespace JYJ.AiYard.Migrations
{
    public partial class add_table8_pay_base : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Tb_AlipayParams",
                schema: "Dbo",
                columns: table => new
                {
                    Id = table.Column<long>(nullable: false)
                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                    Station_ID = table.Column<long>(maxLength: 65, nullable: false),
                    Client_ID = table.Column<long>(maxLength: 65, nullable: false),
                    Alipay_SHOPSNAME = table.Column<string>(maxLength: 200, nullable: true),
                    Alipay_PID = table.Column<string>(maxLength: 150, nullable: true),
                    Alipay_APPID = table.Column<string>(maxLength: 150, nullable: true),
                    Alipay_MD5_KEY = table.Column<string>(maxLength: 150, nullable: true),
                    Alipay_PUBLIC_KEY = table.Column<string>(maxLength: 4000, nullable: true),
                    Alipay_MERCHANT_PRIVATE_KEY = table.Column<string>(maxLength: 4000, nullable: true),
                    Alipay_MERCHANT_PUBLIC_KEY = table.Column<string>(maxLength: 4000, nullable: true),
                    Alipay_SERVER_URL = table.Column<string>(maxLength: 350, nullable: true),
                    Alipay_MAPI_URL = table.Column<string>(maxLength: 350, nullable: true),
                    Alipay_MONITOR_URL = table.Column<string>(maxLength: 350, nullable: true),
                    Alipay_NOTIFY_URL = table.Column<string>(maxLength: 512, nullable: true),
                    Alipay_QUERY_URL = table.Column<string>(maxLength: 512, nullable: true),
                    Alipay_RETURN_URL = table.Column<string>(maxLength: 512, nullable: true),
                    TenantId = table.Column<int>(maxLength: 65, nullable: false),
                    CreationTime = table.Column<DateTime>(maxLength: 65, nullable: false),
                    CreatorUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModifierUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModificationTime = table.Column<DateTime>(maxLength: 65, nullable: true),
                    IsDeleted = table.Column<bool>(maxLength: 65, nullable: false),
                    DeleterUserId = table.Column<long>(maxLength: 65, nullable: true),
                    DeletionTime = table.Column<DateTime>(maxLength: 65, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Tb_AlipayParams", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Tb_CCBPayParams",
                schema: "Dbo",
                columns: table => new
                {
                    Id = table.Column<long>(nullable: false)
                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                    Station_ID = table.Column<long>(maxLength: 65, nullable: false),
                    Client_ID = table.Column<long>(maxLength: 65, nullable: false),
                    CCB_SHOPSNAME = table.Column<string>(maxLength: 200, nullable: true),
                    CCB_WG_MERFLAG = table.Column<string>(maxLength: 65, nullable: true),
                    CCB_WG_MERCHANTID = table.Column<string>(maxLength: 65, nullable: true),
                    CCB_WG_POSID = table.Column<string>(maxLength: 65, nullable: true),
                    CCB_WG_TERMNO1 = table.Column<string>(maxLength: 65, nullable: true),
                    CCB_WG_TERMNO2 = table.Column<string>(maxLength: 65, nullable: true),
                    CCB_WG_BRANCHID = table.Column<string>(maxLength: 65, nullable: true),
                    CCB_WG_PKEY = table.Column<string>(maxLength: 2000, nullable: true),
                    CCB_JH_MERFLAG = table.Column<string>(maxLength: 65, nullable: true),
                    CCB_JH_MERCHANTID = table.Column<string>(maxLength: 65, nullable: true),
                    CCB_JH_POSID = table.Column<string>(maxLength: 65, nullable: true),
                    CCB_JH_TERMNO1 = table.Column<string>(maxLength: 65, nullable: true),
                    CCB_JH_TERMNO2 = table.Column<string>(maxLength: 65, nullable: true),
                    CCB_JH_BRANCHID = table.Column<string>(maxLength: 65, nullable: true),
                    CCB_JH_PKEY = table.Column<string>(maxLength: 2000, nullable: true),
                    CCB_FACE_MERFLAG = table.Column<string>(maxLength: 65, nullable: true),
                    CCB_FACE_MERCHANTID = table.Column<string>(maxLength: 65, nullable: true),
                    CCB_FACE_POSID = table.Column<string>(maxLength: 65, nullable: true),
                    CCB_FACE_TERMNO1 = table.Column<string>(maxLength: 65, nullable: true),
                    CCB_FACE_TERMNO2 = table.Column<string>(maxLength: 65, nullable: true),
                    CCB_FACE_BRANCHID = table.Column<string>(maxLength: 65, nullable: true),
                    CCB_FACE_PKEY = table.Column<string>(maxLength: 2000, nullable: true),
                    CCB_CCB_PASSWord = table.Column<string>(maxLength: 65, nullable: true),
                    TenantId = table.Column<int>(maxLength: 65, nullable: false),
                    CreationTime = table.Column<DateTime>(maxLength: 65, nullable: false),
                    CreatorUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModifierUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModificationTime = table.Column<DateTime>(maxLength: 65, nullable: true),
                    IsDeleted = table.Column<bool>(maxLength: 65, nullable: false),
                    DeleterUserId = table.Column<long>(maxLength: 65, nullable: true),
                    DeletionTime = table.Column<DateTime>(maxLength: 65, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Tb_CCBPayParams", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Tb_MicroPayParams",
                schema: "Dbo",
                columns: table => new
                {
                    Id = table.Column<long>(nullable: false)
                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                    Station_ID = table.Column<long>(maxLength: 65, nullable: false),
                    Client_ID = table.Column<long>(maxLength: 65, nullable: false),
                    MicroPay_SHOPSNAME = table.Column<string>(maxLength: 200, nullable: true),
                    MicroPay_ACCOUNT = table.Column<string>(maxLength: 150, nullable: true),
                    MicroPay_APPID = table.Column<string>(maxLength: 150, nullable: true),
                    MicroPay_APPSECRET = table.Column<string>(maxLength: 150, nullable: true),
                    MicroPay_MCHID = table.Column<string>(maxLength: 150, nullable: true),
                    MicroPay_SUB_MCHID = table.Column<string>(maxLength: 150, nullable: true),
                    MicroPay_KEY = table.Column<string>(maxLength: 150, nullable: true),
                    MicroPay_NOTIFY_URL = table.Column<string>(maxLength: 512, nullable: true),
                    MicroPay_QUERY_URL = table.Column<string>(maxLength: 512, nullable: true),
                    MicroPay_RETURN_URL = table.Column<string>(maxLength: 512, nullable: true),
                    MicroPay_CERT = table.Column<string>(maxLength: 512, nullable: true),
                    MicroPay_ClientIP = table.Column<string>(maxLength: 65, nullable: true),
                    TenantId = table.Column<int>(maxLength: 65, nullable: false),
                    CreationTime = table.Column<DateTime>(maxLength: 65, nullable: false),
                    CreatorUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModifierUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModificationTime = table.Column<DateTime>(maxLength: 65, nullable: true),
                    IsDeleted = table.Column<bool>(maxLength: 65, nullable: false),
                    DeleterUserId = table.Column<long>(maxLength: 65, nullable: true),
                    DeletionTime = table.Column<DateTime>(maxLength: 65, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Tb_MicroPayParams", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Tb_Objects",
                schema: "Dbo",
                columns: table => new
                {
                    Id = table.Column<long>(nullable: false)
                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                    Station_ID = table.Column<long>(maxLength: 65, nullable: false),
                    OBJ_ID = table.Column<int>(maxLength: 65, nullable: false),
                    OBJ_Name = table.Column<string>(maxLength: 65, nullable: true),
                    OBJ_DESC = table.Column<string>(maxLength: 150, nullable: true),
                    OBJ_TYPE = table.Column<int>(maxLength: 65, nullable: false),
                    TenantId = table.Column<int>(maxLength: 65, nullable: false),
                    CreationTime = table.Column<DateTime>(maxLength: 65, nullable: false),
                    CreatorUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModifierUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModificationTime = table.Column<DateTime>(maxLength: 65, nullable: true),
                    IsDeleted = table.Column<bool>(maxLength: 65, nullable: false),
                    DeleterUserId = table.Column<long>(maxLength: 65, nullable: true),
                    DeletionTime = table.Column<DateTime>(maxLength: 65, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Tb_Objects", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Tb_YardLocalFree",
                schema: "Dbo",
                columns: table => new
                {
                    Id = table.Column<long>(nullable: false)
                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                    Station_ID = table.Column<long>(maxLength: 65, nullable: false),
                    LocalFreeName = table.Column<string>(maxLength: 200, nullable: true),
                    LocalFreeType = table.Column<string>(maxLength: 32, nullable: true),
                    LocalFreeValue = table.Column<decimal>(maxLength: 65, nullable: false),
                    TenantId = table.Column<int>(maxLength: 65, nullable: false),
                    CreationTime = table.Column<DateTime>(maxLength: 65, nullable: false),
                    CreatorUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModifierUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModificationTime = table.Column<DateTime>(maxLength: 65, nullable: true),
                    IsDeleted = table.Column<bool>(maxLength: 65, nullable: false),
                    DeleterUserId = table.Column<long>(maxLength: 65, nullable: true),
                    DeletionTime = table.Column<DateTime>(maxLength: 65, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Tb_YardLocalFree", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Tb_YardPayNormal",
                schema: "Dbo",
                columns: table => new
                {
                    Id = table.Column<long>(nullable: false)
                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                    Station_ID = table.Column<long>(maxLength: 65, nullable: false),
                    CardTypeID = table.Column<int>(maxLength: 65, nullable: false),
                    CardType = table.Column<string>(maxLength: 65, nullable: true),
                    CHour = table.Column<int>(maxLength: 65, nullable: false),
                    Free_Minute = table.Column<int>(maxLength: 65, nullable: false),
                    HighPay = table.Column<decimal>(maxLength: 65, nullable: false),
                    Amount = table.Column<decimal>(maxLength: 65, nullable: false),
                    HHourPay = table.Column<bool>(maxLength: 65, nullable: false),
                    Free_Forever = table.Column<bool>(maxLength: 65, nullable: false),
                    OverTime = table.Column<int>(maxLength: 65, nullable: false),
                    TenantId = table.Column<int>(maxLength: 65, nullable: false),
                    CreationTime = table.Column<DateTime>(maxLength: 65, nullable: false),
                    CreatorUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModifierUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModificationTime = table.Column<DateTime>(maxLength: 65, nullable: true),
                    IsDeleted = table.Column<bool>(maxLength: 65, nullable: false),
                    DeleterUserId = table.Column<long>(maxLength: 65, nullable: true),
                    DeletionTime = table.Column<DateTime>(maxLength: 65, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Tb_YardPayNormal", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Tb_YardStation",
                schema: "Dbo",
                columns: table => new
                {
                    Id = table.Column<long>(nullable: false)
                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                    Station_ID = table.Column<long>(maxLength: 65, nullable: false),
                    Yard_ID = table.Column<long>(maxLength: 65, nullable: false),
                    Yard_Name = table.Column<string>(maxLength: 512, nullable: true),
                    ParkCount = table.Column<int>(maxLength: 65, nullable: false),
                    ParkCardTypeId = table.Column<string>(maxLength: 512, nullable: true),
                    GuestCount = table.Column<int>(maxLength: 65, nullable: false),
                    GuestCardTypeId = table.Column<string>(maxLength: 512, nullable: true),
                    MonthCount = table.Column<int>(maxLength: 65, nullable: false),
                    MonthCardTypeId = table.Column<string>(maxLength: 512, nullable: true),
                    BigSmall = table.Column<bool>(maxLength: 65, nullable: false),
                    Charge = table.Column<bool>(maxLength: 65, nullable: false),
                    TenantId = table.Column<int>(maxLength: 65, nullable: false),
                    CreationTime = table.Column<DateTime>(maxLength: 65, nullable: false),
                    CreatorUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModifierUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModificationTime = table.Column<DateTime>(maxLength: 65, nullable: true),
                    IsDeleted = table.Column<bool>(maxLength: 65, nullable: false),
                    DeleterUserId = table.Column<long>(maxLength: 65, nullable: true),
                    DeletionTime = table.Column<DateTime>(maxLength: 65, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Tb_YardStation", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Tb_YardUserParking",
                schema: "Dbo",
                columns: table => new
                {
                    Id = table.Column<long>(nullable: false)
                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                    Station_ID = table.Column<long>(maxLength: 65, nullable: false),
                    User_ID = table.Column<long>(maxLength: 65, nullable: false),
                    ParkingPos = table.Column<string>(maxLength: 200, nullable: true),
                    CUR_PLATENO = table.Column<string>(maxLength: 65, nullable: true),
                    IN_TIME = table.Column<DateTime>(maxLength: 65, nullable: true),
                    IN_ID = table.Column<int>(maxLength: 65, nullable: true),
                    OLD_IN_ID = table.Column<int>(maxLength: 65, nullable: true),
                    OLD_IN_TIME = table.Column<DateTime>(maxLength: 65, nullable: true),
                    TenantId = table.Column<int>(maxLength: 65, nullable: false),
                    CreationTime = table.Column<DateTime>(maxLength: 65, nullable: false),
                    CreatorUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModifierUserId = table.Column<long>(maxLength: 65, nullable: true),
                    LastModificationTime = table.Column<DateTime>(maxLength: 65, nullable: true),
                    IsDeleted = table.Column<bool>(maxLength: 65, nullable: false),
                    DeleterUserId = table.Column<long>(maxLength: 65, nullable: true),
                    DeletionTime = table.Column<DateTime>(maxLength: 65, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Tb_YardUserParking", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Tb_AlipayParams",
                schema: "Dbo");

            migrationBuilder.DropTable(
                name: "Tb_CCBPayParams",
                schema: "Dbo");

            migrationBuilder.DropTable(
                name: "Tb_MicroPayParams",
                schema: "Dbo");

            migrationBuilder.DropTable(
                name: "Tb_Objects",
                schema: "Dbo");

            migrationBuilder.DropTable(
                name: "Tb_YardLocalFree",
                schema: "Dbo");

            migrationBuilder.DropTable(
                name: "Tb_YardPayNormal",
                schema: "Dbo");

            migrationBuilder.DropTable(
                name: "Tb_YardStation",
                schema: "Dbo");

            migrationBuilder.DropTable(
                name: "Tb_YardUserParking",
                schema: "Dbo");
           
        }
    }
}
